package com.google.gwt.mobile.phonegap.api;

/**
 * The Class Notification.
 */
public class Notification {

  /**
   * Alert.
   * 
   * @param message the message
   * @param callback the callback
   * @param title the title
   * @param buttonLabel the button label
   */
  public static native void alert(String message, Callback callback, String title,
      String buttonLabel) /*-{
		$wnd.navigator.notification
				.alert(
						message,
						function() {
							callback.@com.google.gwt.mobile.phonegap.api.Notification.Callback::onComplete()();
						}, title, buttonLabel);
  }-*/;

  /**
   * Confirm.
   * 
   * @param message the message
   * @param callback the callback
   * @param title the title
   * @param buttonLabels the button labels
   */
  public static native void confirm(String message, ConfirmCallback callback, String title,
      String buttonLabels) /*-{
		$wnd.navigator.notification
				.confirm(
						message,
						function(result) {
							callback.@com.google.gwt.mobile.phonegap.api.Notification.ConfirmCallback::onComplete(I)(result);
						}, title, buttonLabels);
  }-*/;

  /**
   * Activity start.
   */
  public static native void activityStart() /*-{
		$wnd.navigator.notification.activityStart();
  }-*/;

  /**
   * Activity stop.
   */
  public static native void activityStop() /*-{
		$wnd.navigator.notification.activityStop();
  }-*/;

  /**
   * Progress start.
   * 
   * @param title the title
   * @param message the message
   */
  public static native void progressStart(String title, String message) /*-{
		$wnd.navigator.notification.progressStart(title, message);
  }-*/;

  /**
   * Progress value.
   * 
   * @param value the value
   */
  public static native void progressValue(int value) /*-{
		$wnd.navigator.notification.progressValue(value);
  }-*/;

  /**
   * Progress stop.
   */
  public static native void progressStop() /*-{
		$wnd.navigator.notification.progressStop();
  }-*/;

  /**
   * Blink.
   * 
   * @param count the count
   * @param color the color
   */
  public static native void blink(int count, String color) /*-{
		$wnd.navigator.notification.blink(count, color);
  }-*/;

  /**
   * Vibrate.
   * 
   * @param mills the mills
   */
  public static native void vibrate(int mills) /*-{
		$wnd.navigator.notification.vibrate(mills);
  }-*/;

  /**
   * Beep.
   * 
   * @param count the count
   */
  public static native void beep(int count) /*-{
		$wnd.navigator.notification.beep(count);
  }-*/;

  /**
   * The Interface Callback.
   */
  public interface Callback {
    void onComplete();
  }

  /**
   * The Interface ConfirmCallback.
   */
  public interface ConfirmCallback {
    void onComplete(int selection);
  }
}
